package com.pigs.pigsordersystem.entity;

import java.math.BigDecimal;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Component;

/**
 * <p>
 *
 * </p>
 *
 * @author Y.yang
 * @since 2020-03-14
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
public class ProductEntity extends BaseEntity {


    /**
     * 价格
     */
    private BigDecimal productPrice;

    /**
     * 描述或者规格
     */
    private String productSpecification;

    /**
     * 产品库存模型
     */
    @TableField(exist = false)
    private InventoryEntity inventoryEntity;

    /**
     * 产品图片实体类对象
     */
    @TableField(exist = false)
    private ProductImageEntity productImageEntity;

    /**
     * 客户收货地址 模型
     */
    @TableField(exist = false)
    private SiteEntity siteEntity;

    /**
     * 财务表 模型
     */
    @TableField(exist = false)
    private FinanceEntity financeEntity;


    @Override
    public String toString() {
        return "ProductEntity{" +
                "productPrice=" + productPrice +
                ", productSpecification='" + productSpecification + '\'' +
                ", inventoryEntity=" + inventoryEntity +
                ", productImageEntity=" + productImageEntity +
                ", financeEntity=" + financeEntity +
                ", siteEntity=" + siteEntity +
                ", productName='" + super.getName() + '\'' +
                ", productCreateTime='" + super.getCreateTime() + '\'' +
                ", productStatus='" + super.getStatus() + '\'' +
                '}';
    }
}
